package com.example.demo.mapper;

import com.example.demo.entity.AlterDemand;
import com.example.demo.entity.UpdateCheck;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface AlterDemandMapper {

    //  添加需求
    public int addDemand(AlterDemand alterDemand);
    //  更新需求
    public int AlterDemand(AlterDemand alterDemand);
    //  审核需求
    public int updateCheck(UpdateCheck updateCheck);
    //  如果审核通过且为新增需求，添加到Demand表
    public int insertDemand(UpdateCheck updateCheck);
    //  如果审核通过但为更新需求，更新Demand表对应项目
    public int updateDemand(UpdateCheck updateCheck);

    public int getAlterDemandCounts(@Param("bgProject")String bgProject,@Param("alterdemand_name") String alterdemand_name,@Param("if_check") int if_check,
                                    @Param("time_classification") int time_classification);

    public List<AlterDemand> getAllAlterDemand(@Param("bgProject")String bgProject,@Param("alterdemand_name") String alterdemand_name,
                                               @Param("if_check") int if_check,
                                               @Param("time_classification") int time_classification,
                                               @Param("pageStart") int pageStart,
                                               @Param("pageSize") int pageSize);

}